﻿using System.Configuration;

namespace POS.USBScanner.Configuration
{
    public class BarcodeScannerListenerConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("hardwareIds", IsDefaultCollection = true)]
        [ConfigurationCollection(typeof(BarcodeScannerListenerConfigurationElementCollection))]
        public BarcodeScannerListenerConfigurationElementCollection HardwareIds
        {
            get { return this["hardwareIds"] as BarcodeScannerListenerConfigurationElementCollection; }
            set { this["hardwareIds"] = value; }
        }

        public static BarcodeScannerListenerConfigurationSection GetConfiguration()
        {
            return ConfigurationManager.GetSection("barcodeScanner") as
                BarcodeScannerListenerConfigurationSection;
        }
    }
}
